package com.hotel.dao;

import java.util.List;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.hotel.entity.Dept;
import com.hotel.entity.User;

public interface UserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
    
    /**
     * 查找全部用户
     * @return
     */
    List<User> findAllUser(@Param("pageNo")Integer pageNo,@Param("pageSize")Integer pageSize);
    
    /**
	 * 通过邮箱查询用户
	 * @param userName
	 * @return
	 */
	public User getByUserName(String email);
	
	/**
	 * 通过邮箱查询角色信息
	 * @param userName
	 * @return
	 */
	public Set<String> getRoles(String email);
	
	/**
	 * 通过邮箱查询权限信息
	 * @param userName
	 * @return
	 */
	public Set<String> getPermissions(String email);
}